package demo19;

import java.io.*;

public class demo19_4 {
    public static void main(String[] args) {
        try (Reader fr = new FileReader("src\\main\\java\\demo19\\a.txt");
             BufferedReader br = new BufferedReader(fr);
             Writer fw = new FileWriter("src\\main\\java\\demo19\\b.txt");
             BufferedWriter bw = new BufferedWriter(fw);

        ) {
            String line;
            while((line = br.readLine()) != null){
                bw.write(line);
                bw.newLine();
            }


        } catch (IOException e) {
            throw new RuntimeException(e);
        }

    }
}
